home *** CD-ROM | disk | FTP | other *** search
- ;OCL{{{}}}
- ;OCL{{{ comments
- ; skip roff-paragraphs up and down
- ;OCL}}}
- @if-using not(ocl-file-skippara)
- @use (ocl-file-skippara)
- ;OCL{{{ libs
- @if-using not(ocl-file-error) @lib error @fi
- ;OCL}}}
- ;OCL{{{ vars
- ( defvar
- ( fill-x ; help
- single-blank ; help, which fill-para-mode?
- fill-begin ; used as help
- )
- )
- ;OCL}}}
- ;OCL{{{ previous-paragraph
- (deffun previous-paragraph (
- if in-prompt (return-from-macro) fi
- previous-line
- set fill-x 0
- ;OCL{{{ skip comments
- while =(fill-x 0) (
- while not(or(test-bottom,test-text)) (
- if test-fold-line (
- open-fold
- while not(test-end-fold) (next-line)
- ) fi
- previous-line
- )
- beginning-of-line
- if not(and(test-char ". =(single-blank 0))) (
- set fill-x 1
- ) else (
- previous-line
- ) fi
- )
- ;OCL}}}
- beginning-of-line
- set fill-x 0
- ;OCL{{{ skip current paragraph
- while =(fill-x 0) (
- if or(test-char " ;
- and(test-char ". =(single-blank 0)),
- not(test-begin-line))
- (
- set fill-x 1
- next-line
- ) else (
- previous-line
- if test-top ( failed ) fi
- ) fi
- )
- ;OCL}}}
- ))
- ;OCL}}}
- ;OCL{{{ next-paragraph
- (deffun next-paragraph (
- if in-prompt (return-from-macro) fi
- beginning-of-line
- ;OCL{{{ skip current paragraph
- set fill-begin store-pos
- if test-text (set fill-x 1) else (set fill-x 0) fi
- while >(fill-x 0) (
- goto-counter fill-begin
- if or(test-char " ;
- and(test-char ". =(single-blank 0)),
- not(test-begin-line))
- (
- set fill-x 0
- ) else (
- next-line
- ) fi
- )
- ;OCL}}}
- ;OCL{{{ skip 'comments'
- while =(fill-x 0) (
- while not(or(test-bottom,test-text)) (
- if test-fold-line ( open-fold ) fi
- next-line
- )
- beginning-of-line
- if not(and(test-char ". =(single-blank 0))) (
- set fill-x 1
- ) else (
- next-line
- ) fi
- )
- ;OCL}}}
- if not(test-text) ( failed ) fi
- ))
- ;OCL}}}
- ;OCL{{{ undeclare
- ( undeclare ( fill-x single-blank fill-begin ) )
- ;OCL}}}
- @fi
-